'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx, app } = this;
    const result = await app.mysql.query('select * from account');
    ctx.body = {
      code: 0,
      data: result,
    };
  }
}

module.exports = HomeController;
